
<template>
  <div class="login_container">
    <div class="login_contant">

      <iframe id="frame0" src="http://192.168.100.170:9095/index.html#/aj/UadimWyL" style="border: 0;height: 1080px;width: 100%;"></iframe>
<!--      <iframe id="frame1" src="http://192.168.100.170:9095/index.html#/aj/Mj3rLeEr" style="border: 0;height: 1080px;width: 100%;"></iframe>-->

    </div>

  </div>
</template>

<script>
  import cookies from "js-cookie";
  import { Decrypt, Encrypt } from "@/utils/index";
  import { login } from "@/api/login";
  import { transPsw } from "@/utils/encrypted";
  import { setToken, setAccessUser,setHomepageUrl } from "@/utils/auth";
  export default {
    name: "testIframes",

    data() {
      return {
        activeTop: "-50%",

        currentIndex: 0,
        intervalId: null,
      };
    },
    created() {

    },
    beforeDestroy() {
      if (this.intervalId) {
        clearInterval(this.intervalId); // 清除定时器
      }
    },
    mounted() {
      // this.handleIframeChange();
      // this.intervalId = setInterval(this.changeIframe, 10000); // 每10秒更新一次
    },
    methods: {
      changeIframe() {
        this.currentIndex = (this.currentIndex + 1) % 2; // 循环显示0, 1, 2

        if(this.currentIndex == 0){
          $("#frame0").show();
          $("#frame1").hide();
        }else{
          $("#frame0").hide();
          $("#frame1").show();
        }
      },
    }
  };
</script>

<style lang="scss">
  .login_container .el-input input {
    color: #000;
    background: #fff;
  }

  .login_container {
    .el-input {
      display: inline-block;
      width: 100%;
      input {
        -webkit-appearance: none;
        caret-color: rgba($color: #000000, $alpha: 0.3);
        border: 1px solid #fff;
        &:-webkit-autofill {
          box-shadow: 0 0 0px 1000px #eee inset !important;
          -webkit-text-fill-color: #666 !important;
        }
      }
    }

    .el-form-item {
      border-radius: 5px;
      color: #454545;
    }
  }
  .verifybox {
    position: absolute;
    left: auto;
    right: 30%;
    transform: translate(50%, -50%);
  }
  .take {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
  }
  .login_container {
    height: 100%;
    width: 100%;
    overflow: hidden;
    .login_title {
      width: 100%;
      height: 60px;
      padding: 10px 60px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .left {
        display: flex;
        flex-direction: row;
        .box {
          width: 40px;
          height: 40px;
          margin-top: 6px;
          img {
            width: 100%;
            height: 100%;
          }
        }
        .name {
          font-size: 20px;
          font-weight: bold;
          padding-bottom: 5px;
          margin-left: 10px;
          border-left: 1px solid #ccc;
          padding-top: 14px;
          padding-left: 10px;
        }
        .box1 {
          width: 100px;
          margin-left: 40px;
          cursor: pointer;
          img {
            width: 100%;
            margin-top: 10px;
            margin-left: 10px;
          }
        }
      }
      .right {
        display: flex;
        flex-direction: row;
        .item {
          margin-right: 60px;
          cursor: pointer;
        }
      }
    }
    .login_contant {
      position: relative;
      width: 100%;
      height: calc(100%);
      /*height: calc(100% - 60px);*/
      .login_img {
        display: block;
        width: 100%;
        height: 100%;
      }
      .login_form {
        position: absolute;
        top: 50%;
        right: 30%;
        transform: translate(50%, -50%);
        min-width: 400px;
        width: 22%;
        height: 460px;
        background-color: #ffffff;
        border-radius: 11px;
        padding: 30px;
        overflow: hidden;
        .title_container {
          position: relative;
          .title {
            font-size: 24px;
            color: #1a1a1a;
            .title_name {
              margin: 0;
              font-size: 18px;
            }
          }
          .set_language {
            color: #fff;
            position: absolute;
            top: 3px;
            font-size: 18px;
            right: 0px;
            cursor: pointer;
          }
        }
        .form_fields {
          position: relative;
          width: 100%;
          overflow: hidden;
          padding: 5px 16px;
          background: #ffffff;
          border: 1px solid #e0e0e0;
          box-shadow: 0 0 14px 4px rgba(230, 229, 229, 0.5);
          border-radius: 4px 10px 10px 4px;
          i {
            position: absolute;
            top: -50%;
            left: 0;
            width: 4px;
            height: 50%;
            transition: top 0.2s;
            background: #f5ab1b;
            border-radius: 14px;
          }
          b {
            position: absolute;
            top: 50%;
            left: 0;
            width: 100%;
            height: 1px;
            background: #e0e0e0;
            border-radius: 2px;
            margin-top: -0.5px;
          }
          p {
            margin: 0;
            padding: 0;
            line-height: 32px;
            height: 32px;
            font-size: 12px;
            color: #666;
          }
          .show_pwd {
            position: absolute;
            right: 10px;
            top: 0;
            font-size: 16px;
            color: #889aa4;
            cursor: pointer;
            user-select: none;
          }
        }
        .control {
          width: 100%;
          height: 70px;
          display: flex;
          align-items: center;
          justify-content: space-between;
          font-size: 14px;
          color: #919191;
          .remember {
            width: 36%;
            display: flex;
            align-items: center;
            p {
              padding-left: 8px;
            }
            & > input {
              position: relative;
              width: 14px;
              height: 14px;
            }
            & > input:checked::before {
              content: "\2713";
              background-color: #f5ab1b;
              position: absolute;
              top: 0;
              left: 0px;
              padding-left: 1.5px;
              width: 100%;
              height: 100%;
              border: 1px solid #f5ab1b;
              border-radius: 2px;
              font-size: 12px;
              color: white;
              font-weight: bold;
            }
          }
        }
        .login_btn {
          width: 130px;
          height: 40px;
          background: #f5ab1b;
          border: none;
          border-radius: 10px;
          font-size: 16px;
          color: #ffffff;
          text-align: center;
        }
      }
    }
  }
</style>
